<%@page import="dao.EmDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<c:set var="emps"  value="<%=EmDao.FindAll()%>"/>
<table border="1" style="text-align: center">
<tr>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
<th>部门</th>
<th>职务</th>
<th>工龄</th>
<th>修改操作</th>
<th>删除操作</th>
<tr>

<c:forEach items="${emps}" var="em">
<tr><td>${em.name }</td>
<td>${em.sex }</td>
<td>${em.age }</td>
<td>${em.dapartment }</td>
<td>${em.type }</td>
<td>${em.year }</td>
<td><a href="updateEmployee.jsp?id=${em.id}">修改</a></td>
<td><a href="Delete?id=${em.id}">删除</a></td>
</tr>
</c:forEach>
<tr><td><a href="addEmployee.jsp">增加员工</a></td></tr>
</table>
</body>
</html>